<!DOCTYPE html>
<html lang="zh-cmn-Hans"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head th:include="sb-admin/base :: head(~{::title},~{},~{})">
    <title>SB Admin 2 - Login</title>
</head>

<body class="bg-gradient-primary">
<div class="container">
    <!-- Outer Row -->
    <div class="row justify-content-center">
        <div class="col-xl-10 col-lg-12 col-md-9">
            <div class="card o-hidden border-0 shadow-lg my-5">
                <div class="card-body p-0">
                    <!-- Nested Row within Card Body -->
                    <div class="row">
                        <div class="col-lg-6 d-none d-lg-block bg-login-image" th:style="'background:url(' + @{/img/login.jpg} + ');background-position: center;background-size: cover;'"></div>
                        <div class="col-lg-6">
                            <div class="p-5">
                                <div class="text-center">
                                    <h1 class="h4 text-gray-900 mb-4">Welcome Back!</h1>
                                </div>
                                <form class="user" th:action="@{/login}" method="post">
                                    <!--<div class="form-group">
                                        <input type="email" class="form-control form-control-user"
                                               id="exampleInputEmail" aria-describedby="emailHelp"
                                               placeholder="Enter Email Address...">
                                    </div>-->
                                    <div class="form-group">
                                        <input type="text" class="form-control form-control-user"
                                               id="username" name="username"
                                               placeholder="用户名">
                                    </div>
                                    <div class="form-group">
                                        <input type="password" class="form-control form-control-user"
                                               id="password" name="password" placeholder="密码">
                                    </div>
                                    <div class="form-group">
                                        <div class="custom-control custom-checkbox small">
                                            <input type="checkbox" class="custom-control-input" id="customCheck">
                                            <label class="custom-control-label" for="customCheck">Remember Me</label>
                                        </div>
                                    </div>
                                    <!--<a href="index.html" class="btn btn-primary btn-user btn-block">
                                        Login
                                    </a>-->
                                    <div class="form-group">
                                        <button type="submit" class="btn btn-primary btn-user btn-block">登录</button>
                                    </div>
                                    <div class="form-group">
                                        <div th:if="${loginError}"
                                             class="alert alert-danger fade show" role="alert">
                                            用户或密码不正确!
                                            <!--<strong>用户或密码不正确!</strong>-->
                                        </div>
                                    </div>
                                    <hr>
                                    <a href="index.html" class="btn btn-google btn-user btn-block">
                                        <i class="fab fa-google fa-fw"></i> Login with Google
                                    </a>
                                    <a href="index.html" class="btn btn-facebook btn-user btn-block">
                                        <i class="fab fa-facebook-f fa-fw"></i> Login with Facebook
                                    </a>
                                </form>
                                <hr>
                                <div class="text-center">
                                    <a class="small" href="/forgot-password" th:href="@{/forgot-password}">忘记密码?</a>
                                </div>
                                <div class="text-center">
                                    <a class="small" href="/register" th:href="@{/register}">注册账号!</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- commonJS -->
<div th:replace="sb-admin/base :: commonJS"></div>
</body>
</html>
